<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<title>${place.place_name}</title>
<link href="CSS/bootstrap.css" rel="stylesheet" type="text/css"
	media="all" />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.min.js"></script>
<!-- Custom Theme files -->
<!--theme-style-->
<link href="CSS/style.css" rel="stylesheet" type="text/css" media="all" />
<!--//theme-style-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Whizz Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />

<style type="text/css">
.diarydetailuserlogo {
	border-radius: 50%
}

.timeandfloat {
	float: right;
}

.diarycomdiv {
	margin-bottom: 50px;
}
</style>
<script type="text/javascript">
	function checkcontent() {
		var content = document.getElementById("content").value;
		if (content == "") {
			return false;
		} else {
			return true;
		}
	}
	function checkall() {
		return checkcontent();
	}
</script>
</head>
<body>
	<div>
		<jsp:include page="travelhead.jsp"></jsp:include>
	</div>
	<!--content-->
	<div class="single">
		<div class="container">

			<div class="col-md-8 " style="width: 100%">
				<div class=" single-grid" style="width: 80%">
					<div class="lone-line">
						<h4>${place.place_name }</h4>
					</div>
					<div align="center">
						<a><img style="80%;height: 500px;" class="img-responsive"
							src="upload/${place.place_logo }" /></a>
					</div>
					<div class="grid-categories">
						<font size="4">${place.place_content}</font>
					</div>
				</div>
				<div class=" single-profile">
					<h4>评论（共${count}条）</h4>
					<div class="single-left " style="width: 80%" id="placecom">
						<c:forEach items="${requestScope.list}" var="placecom">
							<div class="clearfix">
								<!-- 这里显示景点评论 -->
								<div class="diarycomdiv">
									<img class="diarydetailuserlogo"
										src="${placecom.placecom_user.user_logo}" style="height:45px;">
									<table>${placecom.placecom_user.user_name}</table>
									<br>
									<table>${placecom.placecom_content}</table>
									<div class="timeandfloat">
										<table style="color: gray;">${placecom.placecom_time }</table>
									</div>
								</div>
							</div>
						</c:forEach>
						<div class="answer-more _j_add_more_button">
							<p align="center">
							<font size="4">
								<a
									href="PlacecomServlet?flag=more&pageIndex=1&op=${place.place_id}">首页</a>
								<a
									href="PlacecomServlet?flag=more&pageIndex=${lastindex}&op=${place.place_id}">上一页</a>
								
								<a> ${pageIndex}/${pageCount} </a>
								<a
									href="PlacecomServlet?flag=more&pageIndex=${nextindex}&op=${place.place_id}">下一页</a>
								<a
									href="PlacecomServlet?flag=more&pageIndex=${pageCount}&op=${place.place_id}">尾页</a>
							</font>
							</p>
						</div>
					</div>
				</div>
				<div class="single-bottom">
					<h3>说点什么吧</h3>
					<form style="width: 80%"
						action="PlacecomServlet?flag=add&user=${sessionScope.user.user_id }&place=${place.place_id}"
						method="post">
						<div class="clearfix"></div>
						<textarea id="content" name="content" rows="3"
							placeholder="输入你想说的话，300字以内" maxlength="300"
							onblur="checkcontent()"></textarea>
						<input type="submit" value="Send" onclick="return checkall()">
					</form>
				</div>
			</div>
		</div>
	</div>

	<!--//content-->
	<div>
		<jsp:include page="about-us.jsp"></jsp:include>
	</div>
</body>
</html>